package example;


import java.io.*;

public class HelloWorld {

    public static void generateCharacters(OutputStream out) 
        throws IOException {

        int firstPrintableCharacter     = 33;
        int numberOfPrintableCharacters = 94;
        int numberOfCharactersPerLine   = 72;

        int start = firstPrintableCharacter;
        while (true) { /* infinite loop */
            for (int i = start; i < start+numberOfCharactersPerLine; i++) {
                out.write((
                            (i-firstPrintableCharacter) % numberOfPrintableCharacters) 
                        + firstPrintableCharacter);
            }
            out.write('\r'); // carriage return
            out.write('\n'); // line feed
            start = ((start+1) - firstPrintableCharacter)  
                % numberOfPrintableCharacters + firstPrintableCharacter;
        }
    }

    public static void _main(String args[]) {
        try {
			HelloWorld.generateCharacters(System.out);
		} catch (IOException e) {
			e.printStackTrace();
		}
    }
}
